package study.javaee.practice.dao;

import study.javaee.practice.entity.JpaProIduserIdPK;
import study.javaee.practice.entity.JpaProjectJoinApply;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface JpaProjectJoinApplyDAO extends JpaRepository<JpaProjectJoinApply, JpaProIduserIdPK> {

    @Query("select p1.name,u.name,p.content,p.state from JpaProjectJoinApply p,JpaProject p1,JpaMd5user u where p.userId = ?1 and p.userId=u.id and p.projectId=p1.id")
    List<Object> findByUserId(int uid);

}
